/*
 * @Description: 描述信息
 * @Version: 版本号
 * @Author: xuebao
 * @Date: 2023-12-14 19:10:07
 * @LastEditors: xuebao
 * @LastEditTime: 2023-12-14 19:17:00
 */

// 懒加载
import { Suspense } from 'react'
import { Spin } from 'antd'
export const lazyLoad = (Component: React.LazyExoticComponent<() => JSX.Element>): React.ReactNode => {
  return (
    <Suspense
      fallback={<Spin style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%' }} />}
    >
      <Component />
    </Suspense>
  )
}
